import { v4 as uuidv4 } from 'uuid';
export const getUUID = ()=>{
  // 先从本地存储获取uuid(看一下本地存储是否有uuid)
  let uuid_token = localStorage.getItem('UUIDTOKEN')
  // 如果没有
  if(!uuid_token){
    // 获取随机的uuid
    uuid_token = uuidv4()
    // 存储到本地存储
    localStorage.setItem('UUIDTOKEN',uuid_token)
  }

  // 要有返回值
    return uuid_token
}